﻿using SqlSugar;
using System;

namespace TiaoTiaoCode.BasicDbCore
{
    /// <summary>
    /// 基础数据模型
    /// </summary>
    public abstract class BaseEntity : BaseSimplyEntity
    {
        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "create_by", Length = 64, ColumnDescription = "创建人", IsNullable = true)]
        public string? CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "create_date", ColumnDescription = "创建时间", IsNullable = true)]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [SugarColumn(ColumnName = "update_by", Length = 64, ColumnDescription = "修改人", IsNullable = true)]
        public string? UpdateBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnName = "update_date", ColumnDescription = "修改时间", IsNullable = true)]
        public DateTime? UpdateDate { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnName = "remarks", Length = 500, ColumnDescription = "备注", IsNullable = true)]
        public string? Remarks { get; set; }

        /// <summary>
        /// 机构标识
        /// </summary>
        [SugarColumn(ColumnName = "company_id", Length = 64, IsNullable = true, ColumnDescription = "机构标识")]
        public string? CompanyId { get; set; } = default!;

        /// <summary>
        /// 删除标记
        /// </summary>
        [SugarColumn(ColumnName = "del_flag", Length = 1, IsNullable = true, ColumnDescription = "删除标记")]
        public string? DelFlag { get; set; } = default!;
    }
}
